package dao

import (
	"context"
	"gorm.io/gorm"
)

type UserDAO interface {
	FindByEmail(ctx context.Context, email string) (User, error)
	FindById(ctx context.Context, id int64) (User, error)
	FindByPhone(ctx context.Context, phone string) (User, error)
	Insert(ctx context.Context, u User) error
}
type User struct {
	DB *gorm.DB
}

func (u *User) FindByEmail(ctx context.Context, email string) (User, error) {
	//TODO implement me
	panic("implement me")
}

func (u *User) FindById(ctx context.Context, id int64) (User, error) {
	//TODO implement me
	panic("implement me")
}

func (u *User) FindByPhone(ctx context.Context, phone string) (User, error) {
	//TODO implement me
	panic("implement me")
}

func (u *User) Insert(ctx context.Context, user User) error {
	//TODO implement me
	panic("implement me")
}

func NewUserDao(db *gorm.DB) UserDAO {
	return &User{
		DB: db,
	}
}
